package com.juyu.miliao.common.builder;

import com.juyu.miliao.common.constant.IntegralRewardsAndPunishmentsType;
import com.juyu.miliao.common.domain.dto.BillDetailIntegralDTO;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author xuanqicheng
 */
public class BillDetailIntegralMqMessageBuilder {

    private BillDetailIntegralDTO billDetailIntegralDTO = new BillDetailIntegralDTO();

    public BillDetailIntegralMqMessageBuilder id(int id){
        billDetailIntegralDTO.setId(id);
        return this;
    }
    public BillDetailIntegralMqMessageBuilder userId(long userId){
        billDetailIntegralDTO.setUserId(userId);
        return this;
    }
    public BillDetailIntegralMqMessageBuilder integralRewardsPunishmentsType(IntegralRewardsAndPunishmentsType type){
        billDetailIntegralDTO.setIntegralRewardsPunishmentsType(type.getCode());
        return this;
    }

    public BillDetailIntegralMqMessageBuilder integralValue(long integralValue){
        billDetailIntegralDTO.setIntegralValue(integralValue);
        return this;
    }

    public BillDetailIntegralMqMessageBuilder createTime(LocalDateTime createTime){
        billDetailIntegralDTO.setCreateTime(createTime);
        return this;
    }

    public BillDetailIntegralMqMessageBuilder createDate(LocalDate createDate){
        billDetailIntegralDTO.setCreateDate(createDate);
        return this;
    }

    public BillDetailIntegralDTO build(){
        return billDetailIntegralDTO;
    }
}
